<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <title>后台实现</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
    <script type="text/javascript" src="./layui/layui.all.js"></script>
    <script type="text/javascript" src="./layui/layui.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">

        <div class="layui-logo"><span th:text="${name}"></span>的日记管理区</div>

        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left ">
            <li class="layui-nav-item"><a href="">控制台</a></li>
            <li class="layui-nav-item"><a href="/login/message">用户</a></li>

        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    <span th:text="${name}"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="/login/message">基本资料</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/login/out"><i class="layui-icon layui-icon-home"
                                                               style="color: #00FF00;margin-right: 2px"></i>退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">个人日记</a>

                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body">


        <h1 style="  margin-left: 50px;">日记：</h1>
        <hr>
        <br><br>

        <div>
            <label style="margin-left: 110px">作者：</label>
            <span th:text="${name}" id="aha"></span>


        </div>

        <br>
        <form action="/comment/post" method="post">

            <input type="hidden" name="name" th:value="${name}">

            <input type="hidden" name="id" id="name" value="123">
            <br>
            <div class="layui-input-block">
                <input type="text" style="width: 80%;height:100px" class="layui-textarea" placeholder="请记录日记"
                       name="message">
            </div>
            <br>
            <input style="margin-left: 111px;" class="layui-btn" type="submit" value="记录">
        </form>
        <br><br><br>
        <h1 style="  margin-left: 50px;">往期日记内容：</h1>
        <hr>
        <ul th:each="comment:${comments}">

            <li>
                <label style="  margin-left: 50px;">作者:</label>
                <span style="  margin-left: 46px;" th:text="${name}"></span>
            </li>
            <li>
                <!--        <span th:text="${comment.date}"></span>-->
                <label style="  margin-left: 50px;">记录时间:</label>
                <span style="  margin-left: 20px;"
                      th:text="${#dates.format(comment.date,'yyyy-MM-dd HH:mm:ss')}"></span>
            </li>
            <li>
                <label style="  margin-left: 50px;">记录内容:</label>
                <strong style="  margin-left: 20px;" th:text="${comment.message}"> </strong>
                <hr>
            </li>

        </ul>

    </div>


    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © gaoyuan.com - 底部固定区域
    </div>
</div>
</div>
<script src="../src/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;

    });

</script>

</body>
</html>